Skip to content

build(deps): bump com.github.ben-manes.caffeine:caffeine from 2.9.3 to 3.0.0#4676

Merged
k8s-ci-robot merged 3 commits intomasterfrom
dependabot/maven/com.github.ben-manes.caffeine-caffeine-3.0.0
Apr 1, 2026
Merged

build(deps): bump com.github.ben-manes.caffeine:caffeine from 2.9.3 to 3.0.0#4676
k8s-ci-robot merged 3 commits intomasterfrom
dependabot/maven/com.github.ben-manes.caffeine-caffeine-3.0.0

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot bot commented on behalf of github Apr 1, 2026

Bumps com.github.ben-manes.caffeine:caffeine from 2.9.3 to 3.0.0.

Release notes

Sourced from com.github.ben-manes.caffeine:caffeine's releases.

3.0.0

This release includes API incompatible changes.

Highlights

  • Java 11 or above is required
  • Java 8 users can continue to use version 2.x, which will be supported

API improvements

  • Added Policy.refreshes() for a snapshot of the in-flight refresh operations
  • CacheLoader and AsyncCacheLoader offer bulk factory methods
  • AsyncCacheLoader methods may now throw checked exceptions
  • Better usage of Checker Framework nullness annotations (#337)
  • LoadingCache.refresh now returns the in-flight future (#143)
  • Various unimplemented default methods are now abstract
  • Added LoadingCache.refreshAll convenience method
  • Bulk loads now receive a Set of keys (was Iterable)
  • More flexible generic bounds and type parameters

Implementation improvements

Incompatible changes

  • VarExpiration time-based puts now return the old value instead of a boolean result
  • Removed jandex resource as no longer utilized by Quarkus
  • Split Policy.Expiration into fixed and refresh interfaces

Deprecation removals

  • CacheWriter, SingleConsumerQueue, and UnsafeAccess
  • StatsCounter.recordEviction variations
  • CacheStats constructors

Notes

  • CacheWriter usages can be replaced by Map computations and Caffeine.evictionListener
  • For best performance Unsafe may be used if available, otherwise falls back to VarHandles
  • We will continue to support and maintain version 2.x for Java 8 users
Commits
  • be6ad63 add checkerframework javadoc link
  • a95ae26 Added snapshot view of in-flight refresh operations
  • 0d23987 misc improvements (javadoc, generics, build)
  • b45b1cc Add refreshAll(keys) convenience method (bulk not supported)
  • b792cc3 Split the release workflow out from the build action
  • 16ddc49 Update version to 3.0.0
  • 28a456e Remove CacheWriter (deprecated for removal in v2.9)
  • e1b3bca Remove jandex as unused
  • a0c310c Prefer VarHandle for ring buffer array
  • d63c871 Mirror usage of @​CheckReturnValue from Guava
  • Additional commits viewable in compare view

Most Recent Ignore Conditions Applied to This Pull Request
Dependency Name Ignore Conditions
com.github.ben-manes.caffeine:caffeine [>= 3.a, < 4]

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [com.github.ben-manes.caffeine:caffeine](https://github.com/ben-manes/caffeine) from 2.9.3 to 3.0.0.
- [Release notes](https://github.com/ben-manes/caffeine/releases)
- [Commits](ben-manes/caffeine@v2.9.3...v3.0.0)

---
updated-dependencies:
- dependency-name: com.github.ben-manes.caffeine:caffeine
  dependency-version: 3.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file java Pull requests that update Java code labels Apr 1, 2026
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 1, 2026
@brendandburns
Copy link
Copy Markdown
Contributor

@copilot please fix CI/CD errors.

…bility

Replace async refresh() with synchronous put() and explicit invalidate()
for keys removed from ConfigMap. This fixes a race condition introduced
in Caffeine 3.x where asMap().get() returns null for expired entries
during an in-flight async refresh, causing KubernetesFromConfigMapTest
to fail intermittently.

Changes:
- Replace LoadingCache with Cache (CacheLoader no longer needed)
- Remove expireAfterWrite (entries managed explicitly by scheduler)
- Use put() to synchronously write ConfigMap data into cache
- Use invalidate() to remove keys no longer present in ConfigMap
- Remove ConfigMapGetterCacheLoader inner class

Agent-Logs-Url: https://github.com/kubernetes-client/java/sessions/07e0048a-55b8-42c1-809c-ff20e3bd4837

Co-authored-by: brendandburns <5751682+brendandburns@users.noreply.github.com>
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 1, 2026
Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 1, 2026

@copilot please fix CI/CD errors.

Fixed in commit 66dd19c.

The CI failures were in KubernetesFromConfigMapTest. The root cause was a behavioral change in Caffeine 3.x: asMap().get() no longer returns values for expired entries (stricter expiry vs. lazy eviction in 2.x). The previous code used expireAfterWrite(refreshInterval) with async refresh() at the same interval, creating a race window where entries expired while an async refresh was in-flight.

The fix in KubernetesFromConfigMapProcessor:

  • Replaced LoadingCache + async refresh() with Cache + synchronous put() — values are written atomically on each scheduler tick
  • Added explicit invalidate() for keys removed from the ConfigMap (replacing the expiry-based removal)
  • Removed expireAfterWrite and the now-unused ConfigMapGetterCacheLoader inner class

Copy link
Copy Markdown
Member

@yue9944882 yue9944882 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 1, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dependabot[bot], yue9944882

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 1, 2026
@k8s-ci-robot k8s-ci-robot merged commit 1ef24dd into master Apr 1, 2026
2 checks passed
@dependabot dependabot bot deleted the dependabot/maven/com.github.ben-manes.caffeine-caffeine-3.0.0 branch April 1, 2026 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. dependencies Pull requests that update a dependency file java Pull requests that update Java code lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants